import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import VueAxios from 'vue-axios';
import axios from './libs/http';
import './libs/cssReset.css';
import './libs/common.less';
import './libs/global.less';
import 'element-plus/dist/index.css';
import ElementPlus from 'element-plus';
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import addVantUI from "./libs/vantUI";
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
window.global = window;
const app = createApp(App);
addVantUI(app);
app.use(ElementPlus, {
  locale: zhCn,
})
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.config.globalProperties.$axios = axios; //全局配置axios
app.use(createPinia());
app.use(router);
// app.use(VueAxios, axios);
// app.provide('axios', app.config.globalProperties.axios);  // provide 'axios'
app.mount('#app');
